<fieldset>
    <legend>Add Product</legend>
    <form name="form-product-add" enctype="multipart/form-data" method="post" action="<?php echo site_url(); ?>/product/add">
        <table>
            <tr>
                <td>Danh mục: </td>
                <td>
                    <select name="CategoryID">
                        <?php
                            foreach($categoryList as $category)
                            {
                                echo '<option value="'.$category['CategoryID'].'">'.$category['Name'].'</option>';
                            }
                        ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td>Mã sản phẩm: </td>
                <td><input type="text" name="Code" class="text span-4"/></td>
            </tr>
            <tr>
                <td>Tên sản phẩm: </td>
                <td><input type="text" name="Name" class="text"/></td>
            </tr>
            <tr>
                <td>Mô tả: </td>
                <td><textarea name="Description" style="width:300px; height: 100px"></textarea></td>
            </tr>
            <tr>
                <td>Giá: </td>
                <td><input type="text" name="Price" class="text span-4"/></td>
            </tr>
            <tr>
                <td>Giá Sale: </td>
                <td><input type="text" name="PriceSale" class="text span-4"/></td>
            </tr>
            <tr>
                <td>Hình ảnh: </td>
                <td><input type="file" name="Image"/></td>
            </tr>
            <tr>
                <td>Tình trạng: </td>
                <td>
                    <select name="Status">
                        <option value="1">Bật</option
                        <option value="0">Tắt</option>
                        <option value="2">Sale</option>
                        <option value="3">Hết hàng</option>
                    </select>
                </td>
            </tr>
        </table>
        <hr/>
        <div>
            <?php
                if(isset($productError))
                {
                    echo '<div class="error">'.$productError.'</div>';
                }
                if(isset($productSuccess))
                {
                    echo '<div class="success">'.$productSuccess.'</div>';
                }
            ?>
            <div style="text-align: right"><input type="submit" name="submit" value="Add" class="button"/></div>
        </div>
    </form>
</fieldset>
